import requests

# 首页
r = requests.get('http://localhost:8088/smeoa/index.php/login')
cookie = r.cookies

# 登陆
url = 'http://localhost:8088/smeoa/index.php?m=login&a=check_login'
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
data = 'emp_no=admin&password=admin'
r = requests.post(url, headers=headers, data=data, cookies=cookie)
if '退出' in r.text:
    print('success')
else:
    print('fail')
#
url = 'http://localhost:8088/smeoa/index.php?m=task&a=folder&fid=all'
r = requests.get(url, headers, cookies=cookie)
print(r.text)
